﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;
using DAO;

namespace FDeal.PH_Admin
{
    public partial class ADmin_ThemThanhVien : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btThayDoiDoanhNghiep_Click(object sender, EventArgs e)
        {
            ThongTinTaiKhoanBUS thongTinTaiKhoanBUS = new ThongTinTaiKhoanBUS();
            THONGTINTAIKHOAN thongTinTaiKhoan = new THONGTINTAIKHOAN();
            thongTinTaiKhoan.TENDANGNHAP = tbTenThanhVien.Text;
            thongTinTaiKhoan.EMAIL = tbEmailThanhVien.Text;
            if (rdbtGioiTinhNam.Checked == true)
                thongTinTaiKhoan.GIOITINH = "Nam";
            else
                thongTinTaiKhoan.GIOITINH = "Nữ";
            DateTime dt = new DateTime(int.Parse(dlNamSinh.Text.ToString()), int.Parse(dlThangSinh.Text.ToString()), int.Parse(dlNgaySinh.Text.ToString()));
            thongTinTaiKhoan.NGAYSINH = dt;
            thongTinTaiKhoanBUS.Them(thongTinTaiKhoan);
            Response.Redirect("~/PH_Admin/ThanhVien.aspx");
            Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alertMe();", true);
        }

        protected void btCanelDoanhNghiep_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/PH_Admin/ThanhVien.aspx");
        }

    }
}